//
//  CreditCardsController.h
//  SmartCheckout
//
//  Created by Barak Edry on 12/31/11.
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CardBackView.h"
#import "CardView.h"
#import "SectionsUtilizationBar.h"

@interface CreditCardsController : UIViewController <UIScrollViewDelegate, CardBackViewDelegate>{
    
    UIScrollView *scrollView;
	UIPageControl *pageControl;
    NSMutableArray *cardViews;
    int numberOfCards;
    // To be used when scrolls originate from the UIPageControl
    BOOL pageControlUsed;
    NSMutableArray* cards;
    int newCardIndex;
    CardView* currentEditingCardView;
    CardBackView* currentBackView;
    SectionsUtilizationBar* _budgetUtilizationBar;
}

@property (nonatomic, strong) NSMutableArray* cards;
@property (nonatomic, readonly) NSArray* cardViews;
@property (strong, nonatomic) IBOutlet UIScrollView *scrollView;
@property (strong, nonatomic) IBOutlet UIPageControl *pageControl;

- (void)loadScrollViewWithCardIndex:(int)cardIndex;

- (void)scrollViewDidScroll:(UIScrollView *)sender;
- (IBAction)showCardInfo:(id)sender;
- (IBAction)showAddCardController:(id)sender;

- (IBAction)changePage:(id)sender;
- (IBAction)dismiss:(id)sender;
- (void)changeToPageIndex:(int)pageIndex;
@end
